#!/usr/bin/python
# -*- coding: utf-8 -*-

'''requests test'''

__author__ = 'baixue'


import json
import requests

# http://search.jiayuan.com/v2/index.php?key=&sex=f&stc=1:11,2:22.30,23:1&sn=default&sv=1&p=1&pt=2073&ft=off&f=select&mt=d
url = 'http://search.jiayuan.com/v2/index.php?key=&sex=f&stc=1:11,2:22.30,23:1&sn=default&sv=1&p=1&pt=2072&ft=off&f=select&mt=d'
data = {'f':'select',
        'jsversion:':'v5',
        'key':'',
        'listStyle':'bigPhoto',
        'p':2,
        'pri_uid':0,
        'sex':'f',
        'sn':'default',
        'stc':'1:11,2:22.30,23:1',
        'sv':1,
        }
headers = {'Accept':'',
           'Accept-Encoding':'gzip,deflate',
           'Content-Length':113,
           'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
           'Cookies':'',
           'Host':'search.jiayuan.com',
           'Referer':'http://search.jiayuan.com/v2/index.php?key=&sex=f&stc=1:11,2:22.30,23:1&sn=default&sv=1&p=1&pt=2072&ft=off&f=select&mt=d',
           'User-Agent':'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0',
           'X-Requested-With':'XMLHttpRequest',
           }
cookies = {}




response = requests.post(url, data=json.dumps(data), headers=headers)
